package com.deity.news.action;

import java.io.IOException;
import java.util.List;
import java.util.Properties;

import com.deity.news.bean.UploadFile;
import com.deity.news.service.DocumentService;
import com.deity.news.service.UploadFileService;
import com.deity.news.util.GeneratorHtml;
import com.deity.news.util.MyActionSupport;

public class ListHomepageVideo extends MyActionSupport {
	private String url;

	@Override
	public String execute() throws Exception {
		Properties p = new Properties();
		try {
			p.load(GeneratorHtml.class.getResourceAsStream("/news.properties"));
		} catch (IOException e) {
			e.printStackTrace();
		}
		url = p.getProperty("url.path");
		
		List<UploadFile> videoList=null;
		videoList=UploadFileService.findVideoFiles(0, 10);
			
		GeneratorHtml.genVideo_js(videoList);
		return SUCCESS;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
	
	
	
	
}
